#define _CRT_SECURE_NO_WARNINGS 1
#include"SGLlist.h"

void test1()
{
	SLNode* plist = NULL;
	SGLPrint(plist);
	SGLPushFront(&plist, 1);
	SGLPrint(plist);
	SGLPushFront(&plist, 2);
	SGLPushFront(&plist, 3);
	SGLPushFront(&plist, 4);
	SGLPushFront(&plist, 5);
	SGLPopFront(&plist);
	SGLPrint(plist);
	SGLPopFront(&plist);
	SGLPrint(plist);
	SGLPrint(plist);
}

void test2()
{
	SLNode* plist = NULL;
	SGLPushBack(&plist, 1);
	SGLPrint(plist);
	SLNode* pos = SGLFind(plist, 1);
	SGLErase(&plist, pos);
	/*if (pos != NULL)
		SGLPrint(pos);
	else
		printf("NULL\n");*/
	SGLPrint(plist);
	SGLDestory(plist);
}

int main()
{
	//test1();
	test2();
	return 0;
}